home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
src
/
lib
/
c
/
unixSyscall
/
RCS
/
vfork.c,v
< prev
next >
Wrap
Text File
|
1991-08-22
|
2KB
|
101 lines
head 1.2;
branch ;
access ;
symbols ;
locks mottsmth:1.2; strict;
comment @ * @;
1.2
date 88.07.29.17.41.08; author ouster; state Exp;
branches ;
next 1.1;
1.1
date 88.06.19.14.32.12; author ouster; state Exp;
branches ;
next ;
desc
@@
1.2
log
@Lint.
@
text
@/*
* vfork.c --
*
* Procedure to map from Unix vork system call to Sprite.
*
* Copyright (C) 1986 Regents of the University of California
* All rights reserved.
*/
#ifndef lint
static char rcsid[] = "$Header: vfork.c,v 1.1 88/06/19 14:32:12 ouster Exp $ SPRITE (Berkeley)";
#endif not lint
#include "sprite.h"
#include "status.h"
#include "proc.h"
#include "compatInt.h"
/*
*----------------------------------------------------------------------
*
* vfork --
*
* Procedure to map from Unix vfork system call to Sprite Proc_Fork.
*
* Results:
* UNIX_ERROR is returned upon error, with the actual error code
* stored in errno. Upon success, the value of pid is returned,
* where pid is different for child and parent. The parent receives
* the process id of the child in pid, and the child receives the
* value 0.
*
* Side effects:
* A new process is created.
*
*----------------------------------------------------------------------
*/
int
vfork()
{
ReturnStatus status; /* result returned by Proc_Fork */
int pid; /* process id of child, or 0, set by Proc_Fork */
/* Fork and share the heap since this is a vfork. */
status = Proc_Fork(TRUE, &pid);
if (status == PROC_CHILD_PROC) {
return(0);
}
if (status != SUCCESS) {
errno = Compat_MapCode(status);
return(UNIX_ERROR);
}
return((int) pid);
}
@
1.1
log
@Initial revision
@
text
@d11 1
a11 1
static char rcsid[] = "$Header: vfork.c,v 1.1 86/07/07 15:11:57 douglis Exp $ SPRITE (Berkeley)";
d45 1
a45 1
Proc_PID pid; /* process id of child, or 0, set by Proc_Fork */
@